In a communication system in which communication apparatuses are connected by a transmission line in a ring shape (a loop shape) such that a communication apparatus including a master station, which includes first and second ports for switching a clockwise flow of information or a counterclockwise flow of information to the transmission line and a control unit for controlling ON/OFF states of the first and second ports, and a slave station, which includes first and second ports for switching a clockwise feeding of information or a counterclockwise feeding of information to the transmission line, connects a first port and a second port of another communication apparatus adjacent to the communication apparatus, a technology is proposed that enables the control unit of the master station to perform communication in a bus-type configuration by turning off a first or second port of any one of the communication apparatuses (see, for example, Patent Literature 1).
In this communication system, before communication is started, processing for checking, for example, presence or absence of occurrence of a breaking of wire and a failure of the slave station and performing reconfiguration to an appropriate bus-type transmission line is performed. First, the control unit of the master station turns off the first port, turns on the second port, forcibly changes the ring-shaped transmission line to a bus-type transmission line, turns on first ports of all slave stations, and turns off second ports of all the slave stations. In this state, when the control unit of the master station transmits a transmission command, an acknowledgement is returned from only a first slave station connected to the second port of the master station.
Therefore, a number of this first slave station is stored in a slave station position recognition area to clearly show connection order.
Subsequently, the control unit of the master station performs control to turn on the turned-off second port of the first slave station from which the acknowledgement is returned and transmits a transmission command anew. As a result, because an acknowledgement is returned from only a second slave station connected to a second port of the first slave station, the control unit of the master station stores, in the slave station position recognition area, indication that the second slave station is connected after the first slave station. The control unit repeatedly performs such processing and, when no new acknowledgement is received from the slave stations, determines that a slave station that returns an acknowledgement last is a slave station at the end. Thereafter, the control unit of the master station turns on the first port, turns off the second port, performs the same processing, and grasps the configuration of the communication system.